﻿using System.Collections.Generic;
using NUnit.Framework;

namespace PriceCalculator.Tests
{
  [TestFixture]
  class CalculatePriceFromSeriesList
  {
    [Test]
    public void Test1()
    {
      var input = new List<int> {1, 3, 5};
      var expected = 8.0 + 3*0.9*8.0 + 5*0.75*8;

      var result = Calculator.CalculatePriceFromSeriesList(input);

      Assert.That(result, Is.EqualTo(expected));
    }

    [Test]
    public void TestNoBooks()
    {
      var input = new List<int> { 0 };
      var expected = 0.0;

      var result = Calculator.CalculatePriceFromSeriesList(input);

      Assert.That(result, Is.EqualTo(expected));
    }
  }
}
